package org.jeecg.modules.car.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.car.entity.CarParkInfo;
import org.jeecg.modules.car.mapper.CarParkInfoMapper;
import org.jeecg.modules.car.service.ICarParkInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 车场信息表
 * @Author: jeecg-boot
 * @Date:   2019-07-10
 * @Version: V1.0
 */
@Service
public class CarParkInfoServiceImpl extends ServiceImpl<CarParkInfoMapper, CarParkInfo> implements ICarParkInfoService {
    @Autowired
    CarParkInfoMapper carParkInfoMapper;
    @Override
    public List<CarParkInfo> getListByProjectId(String projectId) {
        return carParkInfoMapper.getListByProjectId(projectId);
    }

    @Override
    public CarParkInfo getByProjectIdAndParkName(String projectId, String parkName) {
        return carParkInfoMapper.getByProjectIdAndParkName(projectId,parkName);
    }

    @Override
    public List<CarParkInfo> findPage(Page<CarParkInfo> page, CarParkInfo carParkInfo) {
        return carParkInfoMapper.findAllList(page,carParkInfo);
    }

    @Override
    public CarParkInfo getByOutParkId(String outParkId) {
        return carParkInfoMapper.getByOutParkId(outParkId);
    }

    @Override
    public CarParkInfo getByParkId(String parkId) {
        return carParkInfoMapper.getByParkId(parkId);
    }

    /**
     * 查询需要上传数据的车场
     * @return
     */
    @Override
    public List<CarParkInfo> findShParking() {
        return carParkInfoMapper.findShParking();
    }

    @Override
    public CarParkInfo getBySuperviseParkId(String superviseParkId) {
        return carParkInfoMapper.getBySuperviseParkId(superviseParkId);
    }


}
